#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>

 // 

int main()
{
	char s[50];
	char t[50];

	scanf("%s", s);
	scanf("%s", t);

	int cur = 0;
	char tmp2[50] = { 0 };
	
	for (int i = 0; s[i] != '\0'; i++)
	{
		int begin1 = i;
		int begin2 = 0;
		int len = 0;

		while (s[begin1] != t[begin2] && t[begin2] != '\0')
		{
			begin2++;
		}

		if (t[begin2] == '\0')
			continue;

		while (t[begin2] != '\0')
		{
			len = 0;
			int end1 = begin1;
			int end2 = begin2;
			char tmp1[50] = { 0 };
			int j = 0;
			while (s[end1] == t[end2] && s[end1] != '\0' && t[end2] != '\0')
			{
				len++;
				tmp1[j++] = s[end1];
				end1++;
				end2++;
			}

			if (len > cur)
			{
				cur = len;
				memcpy(tmp2, tmp1, sizeof(char) * 50);
			}

			if (s[end1 - 1] == t[end2 - 1])
			{
				begin2 = end2;
			}
			else
			{
				begin2++;
			}
		}

	}


	if (cur == 0)
	{
		printf("No Answer\n");
	}
	else
	{
		printf("%s\n", tmp2);
	}

	return 0;
}